From: Richard M. Stallman Date: Tue, 20 Apr 2004 20:53:01 +0000 (+0000) Subject: (help-mode-finish): Set help-return-alist first X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~23066 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=b2afc65f7b01a25f0f0864cf69c8a5d815e76384;p=emacs.git (help-mode-finish): Set help-return-alist first thing, setting only the entry for the selected window. --- diff --git a/lisp/help-mode.el b/lisp/help-mode.el index 149eebb3d36..4499f5c48cb 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el @@ -195,14 +195,17 @@ Commands: ;;;###autoload (defun help-mode-finish () + (let ((entry (assq (selected-window) view-return-to-alist))) + (if entry (setcdr entry (cons (selected-window) + help-return-method)) + (setq view-return-to-alist + (cons (cons (selected-window) help-return-method) + view-return-to-alist)))) (when (eq major-mode 'help-mode) ;; View mode's read-only status of existing *Help* buffer is lost ;; by with-output-to-temp-buffer. (toggle-read-only 1) - (help-make-xrefs (current-buffer))) - (setq view-return-to-alist - (list (cons (selected-window) help-return-method)))) - + (help-make-xrefs (current-buffer)))) ;; Grokking cross-reference information in doc strings and ;; hyperlinking it.